package cn.tianyigps.tianyigpspublic.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.geo.GeoJsonPoint;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexType;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;

import java.util.Date;

/**
 * Created with IntelliJ IDEA
 * Date: 2018/6/15
 * Time: 14:52
 * Description:基站定位数据对象
 */
@Getter
@Setter
@ToString
public class BaseStation {

    @Id
    //lac+cell_id组成唯一标识
    private String id;
    private String lac;
    private String cellId;
    @GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
    private GeoJsonPoint points;
    @JsonFormat(pattern = "yyyy-MM-dd HH:ss:mm")
    private Date time;
}
